package org.corolla.cloth.constdata;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.corolla.cloth.entity.Apple;
import org.corolla.cloth.entity.ClothStyle;
import org.junit.Test;

public class ClothStyleConst {
	
	private static Log log = LogFactory.getFactory().getInstance(ClothSizeConst.class);
	
	private static Map<String, ClothStyle> clothStyleMap;
	public static final String MAN="man_";
	public static final String WOMEN="women_";
	
	// 上装
	public static final String SZ="sz_";
	// 下装
	public static final String XZ="xz_";
	// 裙子
	public static final String SKIRT="skirt_";
	

	// t恤
	public static final String TSHIRT="tshirt";
	// 衬衫
	public static final String BLOUSE="blouse";
	// 夹克
	public static final String JACKET="jacket";
	// 西服
	public static final String WESTERN_CLOTH="westernCloth";
	// 短裙
	public static final String SHORT="shortkilt";	
	// 连衣裙
	public static final String DRESS="dress";
	// 长裙
	public static final String LONG="longuette";
	// 吊带
	public static final String GALLUS ="gallus";
	// 短裤
	public static final String SHORTS="shorts";	
	// 长裤
	public static final String TROUSERS="trousers";
	// 女分裤
	public static final String CROPPED="cropped";
	
	
	/**
	 * 构造 key-value 的clothStyleMap
	 */
	static {
		
		log.info("Cloth Style Map加载中....");
		
		clothStyleMap = new HashMap<String, ClothStyle>();
		
		// 男上装t恤
		ClothStyle clothStyle = new ClothStyle(ClothStyle.GENDER_MAN,
												ClothStyle.CZSTYLE_SZ,
												ClothStyle.FORM_TSHIRT);
		String key = MAN+SZ+TSHIRT;
		clothStyleMap.put(key, clothStyle);
		
		/**
		 * 男-上装-衬衫
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_MAN,
									ClothStyle.CZSTYLE_SZ,
									ClothStyle.FORM_BLOUSE);
		key = MAN+SZ+BLOUSE;
		clothStyleMap.put(key, clothStyle);
	
		/**
		 * 男-上装-衬衫
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_MAN,
									ClothStyle.CZSTYLE_SZ,
									ClothStyle.FORM_BLOUSE);
		key = MAN+SZ+BLOUSE;
		clothStyleMap.put(key, clothStyle);
		
		/**
		 * 男-上装-夹克
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_MAN,
									ClothStyle.CZSTYLE_SZ,
									ClothStyle.FORM_JACK);
		key = MAN+SZ+JACKET;
		clothStyleMap.put(key, clothStyle);
		

		/**
		 * 男-上装-西服
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_MAN,
									ClothStyle.CZSTYLE_SZ,
									ClothStyle.FORM_WESTERN_CLOTH);
		key = MAN+SZ+WESTERN_CLOTH;
		clothStyleMap.put(key, clothStyle);
		
		/**
		 * 男-下装-短裤
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_MAN,
									ClothStyle.CZSTYLE_XZ,
									ClothStyle.FORM_SHORTS);
		key = MAN+XZ+SHORTS;
		clothStyleMap.put(key, clothStyle);
	
		/**
		 * 男-下装-长裤
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_MAN,
									ClothStyle.CZSTYLE_XZ,
									ClothStyle.FORM_TROUSERS);
		key = MAN+XZ+TROUSERS;
		clothStyleMap.put(key, clothStyle);

		/**
		 * 女-上装-吊带
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_WOMEN,
									ClothStyle.CZSTYLE_SZ,
									ClothStyle.FORM_GALLUS);
		key = WOMEN+SZ+GALLUS;
		clothStyleMap.put(key, clothStyle);
		
		/**
		 * 女-上装-t恤
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_WOMEN,
									ClothStyle.CZSTYLE_SZ,
									ClothStyle.FORM_TSHIRT);
		key = WOMEN+SZ+TSHIRT;
		clothStyleMap.put(key, clothStyle);

		/**
		 * 女-上装-衬衫
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_WOMEN,
									ClothStyle.CZSTYLE_SZ,
									ClothStyle.FORM_BLOUSE);
		key = WOMEN+SZ+BLOUSE;
		clothStyleMap.put(key, clothStyle);
		
		/**
		 * 女-上装-西装
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_WOMEN,
									ClothStyle.CZSTYLE_SZ,
									ClothStyle.FORM_WESTERN_CLOTH);
		key = WOMEN+SZ+WESTERN_CLOTH;
		clothStyleMap.put(key, clothStyle);
		
		/**
		 * 女-下装-短裤
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_WOMEN,
									ClothStyle.CZSTYLE_SZ,
									ClothStyle.FORM_SHORTS);
		key = WOMEN+XZ+SHORTS;
		clothStyleMap.put(key, clothStyle);
		
		/**
		 * 女-下装-分裤
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_WOMEN,
									ClothStyle.CZSTYLE_SZ,
									ClothStyle.FORM_CROPPED);
		key = WOMEN+XZ+CROPPED;
		clothStyleMap.put(key, clothStyle);
		
		/**
		 * 女-下装-长裤
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_WOMEN,
									ClothStyle.CZSTYLE_SZ,
									ClothStyle.FORM_TROUSERS);
		key = WOMEN+XZ+TROUSERS;
		clothStyleMap.put(key, clothStyle);
		
		
		/**
		 * 女-裙子-短裙
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_WOMEN,
									ClothStyle.CZSTYLE_SKIRT,
									ClothStyle.FORM_SHORT_SKIRT);
		key = WOMEN+SKIRT+SHORT;
		clothStyleMap.put(key, clothStyle);

		/**
		 * 女-裙子-连衣裙
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_WOMEN,
									ClothStyle.CZSTYLE_SKIRT,
									ClothStyle.FORM_DRESS_SKIRT);
		key = WOMEN+SKIRT+DRESS;
		clothStyleMap.put(key, clothStyle);
	
		/**
		 * 女-裙子-长裙
		 */
		clothStyle = new ClothStyle(ClothStyle.GENDER_WOMEN,
									ClothStyle.CZSTYLE_SKIRT,
									ClothStyle.FORM_LONG_SKIRT);
		key = WOMEN+SKIRT+LONG;
		clothStyleMap.put(key, clothStyle);
		
		log.info("Cloth Style Map 加载成功!!!");
	}
	
	/**
	 * 获取 clothStyleMap 
	 * @author ZJD
	 * @return
	 */
	public Map<String, ClothStyle> getClothStyleMap(){
		return clothStyleMap;
	}
	

	
	

}
